package com.lakeworks.service.impl;

import com.lakeworks.common.core.text.Convert;
import com.lakeworks.domain.TktProcess;
import com.lakeworks.mapper.TktProcessMapper;
import com.lakeworks.service.ITktProcessService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 工单处理过程Service业务层处理
 *
 * @author lake
 * @date 2023-07-17
 */
@Service
public class TktProcessServiceImpl implements ITktProcessService {
    @Autowired
    private TktProcessMapper tktProcessMapper;

    /**
     * 查询工单处理过程
     *
     * @param id 工单处理过程主键
     * @return 工单处理过程
     */
    @Override
    public TktProcess selectTktProcessById(Long id) {
        return tktProcessMapper.selectTktProcessById(id);
    }

    /**
     * 查询工单处理过程列表
     *
     * @param tktProcess 工单处理过程
     * @return 工单处理过程
     */
    @Override
    public List<TktProcess> selectTktProcessList(TktProcess tktProcess) {
        return tktProcessMapper.selectTktProcessList(tktProcess);
    }

    /**
     * 新增工单处理过程
     *
     * @param tktProcess 工单处理过程
     * @return 结果
     */
    @Override
    public int insertTktProcess(TktProcess tktProcess) {
        return tktProcessMapper.insertTktProcess(tktProcess);
    }

    /**
     * 修改工单处理过程
     *
     * @param tktProcess 工单处理过程
     * @return 结果
     */
    @Override
    public int updateTktProcess(TktProcess tktProcess) {
        return tktProcessMapper.updateTktProcess(tktProcess);
    }

    /**
     * 批量删除工单处理过程
     *
     * @param ids 需要删除的工单处理过程主键
     * @return 结果
     */
    @Override
    public int deleteTktProcessByIds(String ids) {
        return tktProcessMapper.deleteTktProcessByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除工单处理过程信息
     *
     * @param id 工单处理过程主键
     * @return 结果
     */
    @Override
    public int deleteTktProcessById(Long id) {
        return tktProcessMapper.deleteTktProcessById(id);
    }
}
